package net.shopxx.service.impl;

import javax.annotation.Resource;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import net.shopxx.dao.TaobaoProductDao;
import net.shopxx.entity.TaobaoProduct;
import net.shopxx.service.TaobaoProductService;

/**
 * Service - 淘宝宝贝采集服务
 * 
 * @author frankie
 * @version 3.0
 */
@Service("taobaoProductServiceImpl")
public class TaobaoProductServiceImpl extends BaseServiceImpl<TaobaoProduct, Long>implements TaobaoProductService {

	@Resource(name = "taobaoProductDaoImpl")
	private TaobaoProductDao taobaoProductDao;
	@Resource(name = "taobaoProductDaoImpl")
	public void setBaseDao(TaobaoProductDao taobaoProductDao) {
		super.setBaseDao(taobaoProductDao);
	}
	
	@Override
	@Transactional
	@CacheEvict(value = "taobaoProduct", allEntries = true)
	public void save(TaobaoProduct taobaoProduct) {
		super.save(taobaoProduct);
		taobaoProductDao.flush();
	}

}
